#include <stdio.h>
#include <stdlib.h>
<<<<<<< HEAD
#include <string.h>

int main(int argc, char const *argv[])
{
    float a; 
    scanf("%f", &a);
    while (a)
    {
        if (a < 0)
        {
            a *= 10;
        }
        
        printf("%d", (int)a % 10);
        a *= 10;
    }
    
=======
#include <time.h>

int main(int argc, char const *argv[])
{
    int target = 30, result = 0;
    int datas[target][101];
    srand((unsigned)time(NULL));
    for (size_t i = 0; i < target; i++)
    {
        datas[i][0] = 1;
        for (size_t j = 1; j < 51; j++)
        {
            datas[i][j] = 0;
        }
    }
    
    for (size_t i = 0; i < target; i++)
    {
        printf("\n %d ", datas[i][0]);
        for (size_t j = 1; j <= 50; j++)
        {
            printf("%d ", datas[i][j]);
            if (datas[i][j] == 0)
            {
                result++;
            }
            if (rand() % 3 != 0)
            {
                if (datas[i][j] == 0)
                {
                    if (i + 2 < target)
                    {
                        datas[i + 2][datas[i + 2][0]] = 2;
                        datas[i + 2][0]++;
                    }
                }
                else if (i + datas[i][j] * datas[i][j] < target)
                {
                    datas[i + datas[i][j] * datas[i][j]][datas[i + datas[i][j] * datas[i][j]][0]] = datas[i][j] * datas[i][j];
                    datas[i + datas[i][j] * datas[i][j]][0]++;
                }
            }
            else if (i + 1 < target)
            {
                datas[i + 1][datas[i + 1][0]] = datas[i][j] + 1;
                datas[i + 1][0]++;
            }
        }
    }
    printf("%d", result);
>>>>>>> 5a8842709955cd4ec6e15ebcb17571e5c30d9acd
    return 0;
}
